package edu.sctu.xialei.May.day20150521one;

/**
 * Created by Administrator on 5/21/2015.
 */
public class SettingAllInfo {

    int populationTeacher = 3;
    TeacherData[] teachers = new TeacherData[populationTeacher];

    public void setTeacher1() {
//        初始化
        TeacherData teacher1 = new TeacherData();
        teachers[0] = teacher1;

        teachers[0].nameTeacher = "夏老师";
        teachers[0].numberTeacher = 23;
        teachers[0].courseTeaching = "大学体育";
        teachers[0].sexTeacher = "男";
        teachers[0].titleTeacher = "教授";

//         给学生数组赋值
        for (int i = 0; i < teachers[0].students.length; i++) {
            StudentData student = new StudentData();

            student.nameStudent = "小贱" + (i + 1) + "号";
            student.numberStudent = 66 + i;
            student.addressStudent = "第" + (i + 1) + "座山";
            student.ageStudent = 16 + i;
            student.gradeStudent = (float) 58.5 + i;
            student.sexStudent = "男";
            if (i < 2){
                student.courseStudent = new String[]{"大学英语","大学体育"};
            }
            else{
                student.courseStudent = new String[]{"管理学","大学英语"};
            }

            teachers[0].students[i] = student;
        }

    }

    public void setTeacher2() {
//        初始化
        TeacherData teacher2 = new TeacherData();
        teachers[1] = teacher2;

        teachers[1].nameTeacher = "张老师";
        teachers[1].numberTeacher = 45;
        teachers[1].courseTeaching = "大学英语";
        teachers[1].sexTeacher = "女";
        teachers[1].titleTeacher = "副教授";

//         给学生数组赋值
        for (int i = 0; i < teachers[1].students.length; i++) {
            StudentData student = new StudentData();

            student.nameStudent = "小花" + (i + 1) + "号";
            student.numberStudent = 50 + i;
            student.addressStudent = "第" + (i + 1) + "条河";
            student.ageStudent = 15 + i;
            student.gradeStudent = (float) 59 + i;
            student.sexStudent = "女";

            if (i < 2){
                student.courseStudent = new String[]{"大学体育","经济学","大学英语"};
            }
            else{
                student.courseStudent = new String[]{"管理学","大学英语","经济学"};
            }

            teachers[1].students[i] = student;
        }
    }

    public void setTeacher3() {
//        初始化
        TeacherData teacher3 = new TeacherData();
        teachers[2] = teacher3;

        teachers[2].nameTeacher = "王老师";
        teachers[2].numberTeacher = 41;
        teachers[2].courseTeaching = "经济学";
        teachers[2].sexTeacher = "女";
        teachers[2].titleTeacher = "教授";

//         给学生数组赋值
        for (int i = 0; i < teachers[2].students.length; i++) {
            StudentData student = new StudentData();

            student.nameStudent = "小惨" + (i + 1) + "号";
            student.numberStudent = 30 + i;
            student.addressStudent = "第" + (i + 1) + "棵树";
            student.ageStudent = 18 + i;
            student.gradeStudent = (float) 60 + i;
            student.sexStudent = "女";

            if (i < 2){
                student.courseStudent = new String[]{"大学体育","管理学","大学英语"};
            }
            else{
                student.courseStudent = new String[]{"管理学","大学英语"};
            }

            teachers[2].students[i] = student;
        }
    }
}